<template>

<div class= "banner" >
    <van-swipe class= " my- swipe" : autoplay= " 3000" indicator- color= " white">
        <van-swipe-item v-for="(item, index) in srclist" :key=" index" >
            <img :src=" item. bannerUrl" />
        </van-swipe-item>
    </van-swipe>

</div>
</template>
<script>

import { banner_list }  from "../utils/api" ;
export default {
    data() {
        return {
            srclist: [],
        };
    },
    mounted() {
        banner_list().then((res) =>{
            this.srclist = res.data.list;
        });
    },
};
</script>
<style lang= 'scss' scoped>
.banner .my-swipe{
    height: 100px;
    margin: 10px 10px;
    border-radius: 10px;
}
.van-swipe-item{
    color:#fff;
    font-size: 20px;
    line-height: 100%;
    text-align: center;
}
.van-swipe-item img{
    width: 100%;
    height: 100%;
}

</style>
